#ifndef __EEExpMath_H__
#define __EEExpMath_H__

#include <stdio.h>
#include <maya/MFloatPoint.h>

struct vector3
{
	float x,y,z;
	
	vector3() : x(0.0f), y(0.0f), z(0.0f)
	{}

	vector3(MFloatPoint& data)
	{
		x = data.x;
		y = data.y;
		z = data.z;
	}
	
	vector3(float x,float y, float z)
	{
		this->x = x;
		this->y = y;
		this->z = z;
	}

	vector3 operator + (const vector3& v) const;
	vector3 operator - (const vector3& v) const;
	vector3 operator * (const float v) const;
	vector3 operator / (const float v) const;
	vector3 operator = (const vector3& v);

	static float dot(vector3& a, vector3& b);
	static void normalize(vector3& a);
	static float length(vector3& a);
	static vector3 baseLerp(float t, vector3& A, vector3& B);

};

struct vector2
{
	float x,y;

	vector2() : x(0.0f), y(0.0f)
	{}

	vector2(float x,float y)
	{
		this->x = x;
		this->y = y;
	}

	vector2 operator + (const vector2& v) const;
	vector2 operator - (const vector2& v) const;
	vector2 operator * (const float v) const;
	vector2 operator / (const float v) const;
	vector2 operator = (const vector2& v);

	static vector2 baseLerp(float t, vector2& A, vector2& B);
};

struct plane
{
	vector3 n;
	float d;

	plane()
	{
		n = vector3();
		d = 0.0f;
	}

	plane(float x,float y, float z, float d)
	{
		n = vector3(x,y,z);
		this->d = d;
	}

	plane(vector3& v, float d)
	{
		n = v;
		this->d = d;
	}
};

#endif